<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateWaxSkinRecordsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('wax_skin_records', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('skin_record_id')->comment('肤质记录ID');
			$table->integer('wechat_user_id')->unsigned()->default(0)->comment('对应微信用户的ID，无则为0');
			$table->integer('itemsid')->comment('wax检测项目ID');
			$table->string('itemsname')->nullable()->comment('检测项目名称');
			$table->string('value')->comment('检测值');
			$table->integer('levelsort')->nullable()->comment('水平排名吗？');
			$table->string('type')->nullable()->comment('pad定义的检测类型

moisture 皮肤水份

oil 皮肤油脂

pigment 皮肤色素

redblood 皮肤红血丝

follicle 皮肤毛囊');
			$table->string('origin_img')->nullable()->comment('摄像拍照原图');
			$table->string('analyse_img')->nullable()->comment('分析结果合成图');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('wax_skin_records');
	}

}
